Skip to content

Test pose configs against DeepLabCut's output - #49

Open
C-Achard wants to merge 1 commit into
cy/pose-configfrom
cy/pose-config-fixtures
Open

C-Achard wants to merge 1 commit into
cy/pose-configfrom
cy/pose-config-fixtures

Conversation

@C-Achard

@C-Achard C-Achard commented Dec 4, 2026

Copy link
Copy Markdown
Member

Scope

Frozen pytorch_config.yaml fixtures written by DeepLabCut, and tests that dlccore reads and writes them back unchanged. No change to dlccore.

Motivation

The previous PR of this stack copies PoseConfig to dlccore so that a config DeepLabCut wrote reads the same without it. Once DeepLabCut uses dlccore's copy, nothing else checks that configs written by an earlier release still read: DeepLabCut's own tests build fresh configs.

Main changes

  • Ten configs DeepLabCut dev wrote at d2bbe028, at least one for each distinct set of typed fields across the models it offers; models differ mostly in model.backbone and heads, which are untyped dicts.
  • Four legacy/ configs as older releases wrote them, derived by hand: a legacy net type name, a top_down_ prefix, a top-down crop mismatching its head (DeepLabCut issue 3592), and a weight_init from before 3.0.0rc5.
  • Each fixture is written back byte for byte, its normalised dict (the form an exported model stores) reads back to itself, and legacy configs read as their current form.
  • Reading every fixture in a fresh interpreter loads none of deeplabcut, torch, albumentations or cv2.
  • A strict xfail pins a change owed in DeepLabCut first: the crop repair reports only to the log, not as data in change_notes.

Additional context

  • Fixtures are added, never regenerated, since old configs must keep reading; the README records each one's source. Paths in them contain no separator, as DeepLabCut writes paths with str(Path).
  • The byte-for-byte test assumes dlccore still writes the format these fixtures are in; after a breaking schema change it applies only to fixtures written in the new format.
  • dlccore and DeepLabCut agreeing while both hold a copy is better checked on DeepLabCut's side, where CI has torch; not in this PR.

@C-Achard C-Achard added this to the Config migration milestone Dec 4, 2026
@C-Achard C-Achard added io: config config.yaml reading, writing and its schema consumer: deeplabcut Needed by or affects DeepLabCut consumer: live Needed by or affects DeepLabCut-live and its GUI backwards compatibility Reading files written by older DeepLabCut labels Dec 4, 2026
@C-Achard
C-Achard added this pull request to stack #50 December 4, 2026 15:16
@C-Achard
C-Achard force-pushed the cy/pose-config-fixtures branch from e586953 to ea93db8 Compare December 4, 2026 15:20

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards compatibility Reading files written by older DeepLabCut consumer: deeplabcut Needed by or affects DeepLabCut consumer: live Needed by or affects DeepLabCut-live and its GUI io: config config.yaml reading, writing and its schema

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant